<?php
$title = '职工';
$this->headTitle($title);
?>
<h1><?php echo $this->escapeHtml($title); ?></h1>
<hr>
<div class="row">
    <a class="btn btn-primary"
       href="<?php echo $this->url('staff/default', array('controller' => 'staff', 'action' => 'add')); ?>">添加职工</a>
</div><br>
<table class="table table-hover table-striped">
    <tr>
        <th>身份证号</th>
        <th>姓名</th>
        <th>联系方式</th>
        <th>入职时间</th>
        <th>客户</th>
        <th>操作</th>
    </tr>
    <?php foreach ($this->staffs as $key => $staff): ?>
        <tr>
            <td><?php echo $this->escapeHtml($staff['staff_id']); ?></td>
            <td><?php echo $this->escapeHtml($staff['staff_name']); ?></td>
            <td><?php echo $this->escapeHtml($staff['staff_tel']); ?></td>
            <td><?php echo $this->escapeHtml($staff['start_time']); ?></td>
            <td>
                <a class="btn btn-group"
                   href="<?php echo $this->url("staff/default", array("controller" => "client", "action" => "index", "id" => $staff['staff_id'])); ?>">查看</a>
            </td>
            <td>
                <a class="btn btn-default"
                   href="<?php echo $this->url('staff/default', array('controller' => 'staff', 'action' => 'edit', 'id' => $staff['staff_id'])); ?>">编辑</a>
                <a class="btn btn-danger"
                   href="<?php echo $this->url('staff/default', array('controller' => 'staff', 'action' => 'delete', 'id' => $staff['staff_id'])); ?>">删除</a>
            </td>
        </tr>
    <?php endforeach; ?>
</table>